<extend name="Public/base" />

<block name="body">
  <!-- 按钮工具栏 -->
  <div class="cf">
    <div class="fl">
      <!--<button class="btn ajax-post confirm" url="{:U('del')}" target-form="ids">删 除</button>>
      <button-- class="btn ajax-post confirm" target-form="ids" url="{:U('setStatus',array('status'=>-1))}">删 除</button-->
      <a class="btn" href="{:U('cash')}">刷 新</a>（点击"刷新"按钮清除搜索条件，显示全部信息。）
    </div>

    <!-- 高级搜索 -->
    <form action="{:U()}" method="GET" id="J_search_form">
      <div class="search-form fr cf">
        <div class="fl">
          <select name="flow">
            <option value="">资金流向</option>
            <option value="in">收入</option>
            <option value="out">支出</option>
            <foreach name="type" item="vo" key="vl" >
              <option value="{$vo}"  <eq name="_GET.flow" value="$vo">selected</eq> >{$vl}</option>
            </foreach>
          </select>
        </div>
        <div class="sleft">
          <input type="text" name="keywords" class="search-input" value="{:I('keywords')}" placeholder="支付编号,订单编号或店铺名称查询">
          <a class="sch-btn" href="javascript:;" id="J_search"><i class="btn-search"></i></a>
        </div>
      </div>
    </form>
  </div>

  <!-- 数据表格 -->
  <div class="data-table table-striped">
    <form class="ids">
      <table>
        <thead>
        <tr>
          <th class="row-selected">
            <input class="checkbox check-all" type="checkbox">
          </th>
          <th>交易ID</th>
          <th>店铺名称</th>
          <th>交易时间</th>
          <th>交易备注</th>
          <th>交易金额</th>
          <th>交易状态</th>
        </tr>
        </thead>
        <tbody>
        <notempty name="list">
          <volist name="list" id="vo">
            <tr>
              <td><input class="ids row-selected" type="checkbox" name="ids[]" value="{$vo.id}"></td>
              <td>{$vo.id}</td>
              <td>{$store[$vo['store_id']]['store_name']}</td>
              <td>{$vo.ctime|time_format}</td>
              <td>{$vo.remark}</td>
              <td><span class="{$vo['flow']=='in'?'text-danger':'text-success'}" style="display: inline-block;width: 60px;text-align: right;">{$vo['flow']=='in'?'+':'-'}{:sprintf('%.2f', $vo['amount'])}</span> 元</td>
              <td>{$vo['status']=='1'?'<span class="text-success">交易成功</span>':''}</a>{$vo['status']=='2'?'<span class="text-danger">交易中</span>':''}{$vo['status']=='0'?'交易失败':''}</td>
            </tr>
          </volist>
          <else/>
          <tr><td colspan="10" class="text-center"> aOh! 暂时还没有内容! </td></tr>
        </notempty>
        </tbody>
      </table>
    </form>
    <!-- 分页 -->
    <div class="page">{$_page}</div>
  </div>
</block>

<block name="script">
  <script type="text/javascript" charset="utf-8">
    //导航高亮
    highlight_subnav('{:U('Store/cash')}');
  </script>
</block>
